#include "xslider.h"

XSlider::XSlider(QWidget *p) : QSlider(p)
{

}

void XSlider::mousePressEvent(QMouseEvent* e)
{
    int value = ((float)e->pos().x()) / width() * (maximum() + 1);
    setValue(value);
    QSlider::mousePressEvent(e);
}
